﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace MapEntities
{
    [DataContract]
    public class Shape : LayerItem
    {
        private List<ShapeSegment> segments;

        public List<ShapeSegment> Segments
        {
            get
            {
                if (segments == null)
                    segments = new List<ShapeSegment>(1);
                return segments;
            }

            set
            {
                segments = value;
            }
        }

        public string BackgroundColor { get; set; }
        public TransparencyLevel Transparency { get; set; }

        private ShapeItemBehavior behavior = null;

        public virtual ShapeItemBehavior Behaviour
        {
            get
            {
                if (behavior == null)
                    behavior = new ShapeItemBehavior();
                return behavior;
            }

            set
            {
                behavior = value;
            }
        }
    }
}
